import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/components/index'
import Welcome from '@/components/welcome'
import Details from '@/components/details'
import P404 from '@/components/err/404'
import devCof from '@/conf/dev.conf.js'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Welcome',
      component: Welcome,
      redirect: '/index'
    },
    {
      path: '/index',
      name: 'Index',
      component: Index,
      meta: {
        title: devCof.defaultTitle
      }
    },
    {
      path: '/detail/:id/:k',
      name: 'Details',
      component: Details,
      meta: {
        title: ''
      }
    },
    {
      path: '*',
      name: 'P404',
      component: P404,
      meta: {
        title: devCof.NFTitle
      }
    }
  ]
})
